package com.gtc.zsk.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gtc.zsk.model.dto.questionApply.QuestionApplyQueryRequest;
import com.gtc.zsk.model.entity.QuestionApply;
import com.gtc.zsk.model.vo.QuestionApplyVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 題库题目审核服务
 *
 * @author <a href="https://github.com/ligtc">程序员鱼皮</a>
 * @from <a href="https://www.code-nav.cn">编程导航学习圈</a>
 */
public interface QuestionApplyService extends IService<QuestionApply> {

    /**
     * 校验数据
     *
     * @param questionApply
     * @param add 对创建的数据进行校验
     */
    void validQuestionApply(QuestionApply questionApply, boolean add);

    /**
     * 获取查询条件
     *
     * @param questionApplyQueryRequest
     * @return
     */
    QueryWrapper<QuestionApply> getQueryWrapper(QuestionApplyQueryRequest questionApplyQueryRequest);
    
    /**
     * 获取題库题目审核封装
     *
     * @param questionApply
     * @param request
     * @return
     */
    QuestionApplyVO getQuestionApplyVO(QuestionApply questionApply, HttpServletRequest request);

    /**
     * 分页获取題库题目审核封装
     *
     * @param questionApplyPage
     * @param request
     * @return
     */
    Page<QuestionApplyVO> getQuestionApplyVOPage(Page<QuestionApply> questionApplyPage, HttpServletRequest request);
}
